package com.yunxin.admin.system.application;


import com.yunxin.admin.system.application.command.*;
import com.yunxin.admin.system.application.dto.UpdateUserDetailDTO;

import java.util.List;
import java.util.Map;

/**
 * 用户业务接口
 *
 * @author zero°
 * @since 2023-05-22
 */
public interface UserApplicationService {

    /**
     * 新增用户
     *
     * @param command command
     * @return boolean
     */
    boolean saveUser(AddUserCommand command);

    /**
     * 修改用户
     * @param command   command
     * @return boolean
     */
    boolean updateUser(UpdateUserCommand command);

    /**
     * 新增商户用户
     *
     * @param command command
     * @return boolean
     */
    boolean saveMerchantUser(AddUserMerchantCommand command);

    /**
     * 修改商户用户
     * @param command   command
     * @return boolean
     */
    boolean updateMerchantUser(UpdateUserMerchantCommand command);

    Map<String,String> updateOwnUser(UpdateUserDetailDTO command);


    /**
     * 修改用户商户状态
     *
     * @param sysUserId   sysUserId
     * @param status status
     * @return boolean
     */
    boolean updateUserMerchantStatus(Long sysUserId, Integer status);


    /**
     * 修改商户用户账号接单状态
     *
     * @param sysUserId   sysUserId
     * @param receivingStatus receivingStatus
     * @return boolean
     */
    boolean updateUserMerchantReceivingStatus(Long sysUserId, Integer receivingStatus,Long merchantId);

    /**
     * 删除用户
     *
     * @param idsStr 用户ID，多个以英文逗号(,)分割
     * @return boolean
     */
    boolean deleteUsers(String idsStr);

    /**
     * 修改用户密码
     *
     * @param userId   用户ID
     * @param password 用户密码
     * @return boolean
     */
    boolean updatePassword(Long userId, String password);

    /**
     * 更新用户状态
     * @param userId 用户ID
     * @param status 用户状态
     * @return boolean
     */
    boolean updateStatus(Long userId, Integer status);
    //修改用户接单
    boolean updateUserReceivingStatus(Long userId,Long temaId,Integer receivingStatus);

    //批量用户接单
    boolean updateReceivingStatus(UpdateReceivingStatusCommand command);


}
